1. Field of the Invention
This invention relates to apparatus and methods for storing data sets, and more particularly to apparatus and methods for optimizing the size of extents used to store data sets.
2. Background of the Invention
Currently, when a user allocates data sets on operating systems such as z/OS, the operating system requires the user to specify a primary and secondary allocation amount. The primary allocation amount is the amount of space the data set is assigned on the first extent of the volumes it resides on. The secondary allocation amount is the amount of space that subsequent extensions of the data set receive. The user may select primary and secondary allocation amounts based on how the user anticipates the data set will be used and grow over time.
If a user selects an allocation amount that is too large, meaning that the volume is too fragmented or does not have sufficient free space to accommodate the allocation, the allocation request will fail. If, on the other hand, the user selects an allocation amount that is too small, the operating system may extend the data set so many times that it hits an extent-per-volume limit. Small and numerous extents may also undesirably fragment a volume.
Some logic has been added to z/OS to enable extents to be consolidated during extend processing if the extents are adjacent to one other. However, this functionality requires additional overhead to call the extend function as well as consolidate the extents. This functionality may also undesirably reduce a user's awareness of poorly selected allocation amounts since it may hide the number of times a data set has been extended. For example, in the z/OS environment, extents associated with a data set are recorded in the catalog. The catalog, however, may not indicate how many times the data was extended. This is because certain extents may have been consolidated to form a single or fewer extents. Thus, extent consolidation functionality in z/OS or other operating systems may indirectly cause a user to specify poor allocation amounts that could otherwise be noticed and corrected by the user.
On the other hand, when a user specifies an allocation amount that is too large for the space available, the extend request will fail. Existing solutions may try to reduce the impact of failed extend requests by retrying an allocation with a reduced allocation amount. If this subsequent attempt fails, further attempts may be made by continuing to reduce the allocation amount. Unfortunately, these solutions require several passes through the extend logic code before the extend operation will succeed.
In view of the foregoing, what are needed are apparatus and methods to optimize the size of primary and secondary allocation amounts when performing extend processing. Ideally, such apparatus and methods will reduce or eliminate the chance that an extend request will fail. Such apparatus and methods will also ideally reduce overhead associated with extending and consolidating extents.